﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using IceDog.DNC.Web.Swashbuckle1_X.CustomAttribute;
using Microsoft.AspNetCore.Mvc;

namespace IceDog.DNC.Web.Swashbuckle1_X.Controllers
{
    /// <summary>
    /// 
    /// </summary>
    [Route("api/[controller]")]
    public class ValuesController : Controller
    {
        /// <summary>
        /// Get
        /// </summary>
        /// <example>
        /// GET api/values
        /// </example>
        /// <returns></returns>
        [HttpGet]
        public IEnumerable<string> Get()
        {
            return new string[] { "value1", "value2", "value3"};
        }

        /// <summary>
        /// Get
        /// </summary>
        /// <example>
        /// GET api/values/5
        /// </example>
        /// <param name="id"></param>
        /// <returns></returns>
        [HttpGet("{id}")]
        public string Get(int id)
        {
            return "value"+id;
        }

        /// <summary>
        /// Post
        /// </summary>
        /// <example>
        /// POST api/values
        /// </example>
        /// <param name="value"></param>
        [HttpPost]
        public ActionResult Post([FromBody]string value)
        {
            return Ok();
        }

        /// <summary>
        /// Put
        /// </summary>
        /// <example>
        /// PUT api/values/5
        /// </example>
        /// <param name="id"></param>
        /// <param name="value"></param>
        [HttpPut("{id}")]
        public ActionResult Put(int id, [FromBody]string value)
        {
            return Ok();
        }

        /// <summary>
        /// Delete
        /// </summary>
        /// <example>
        /// DELETE api/values/5
        /// </example>
        /// <param name="id"></param>
        [HttpDelete("{id}")]
        public ActionResult Delete(int id)
        {
            return Ok();
        }
    }
}
